Skip to content

Conversation

CodingCarpincho
Copy link
Contributor

The Swift SDK Generator project should be able to generate SDKs that target FreeBSD systems.

FreeBSD is much simpler than Linux. We only require the user to provide their desired architecture and FreeBSD version. This script will then download the FreeBSD base system content and create a sysroot suitable for use with Swift Package Manager.

Because there are not currently any Swift toolchains for FreeBSD available on swift.org, we require the user to provide a path to a pre-built toolchain if they want the SDK to support building Swift code. In the future, we can download the Swift toolchain like we do for Linux in lieu of requiring the user to provide it.

@MaxDesiatov MaxDesiatov requested a review from euanh August 29, 2025 09:13
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, just a few nits. Thank you so much for this!

Would you mind also updating README.md to mention this new target platform? A post on Swift Forums could also help people to test drive this.

Also, we need to keep compatibility with Swift 6.0 for now, that's why those jobs are failing.

Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, a few more formatting nits after having another look

The Swift SDK Generator project should be able to generate SDKs that target FreeBSD systems.

FreeBSD is much simpler than Linux. We only require the user to provide their desired architecture and FreeBSD version. This script will then download the FreeBSD base system content and create a sysroot suitable for use with Swift Package Manager.

Because there are not currently any Swift toolchains for FreeBSD available on swift.org, we require the user to provide a path to a pre-built toolchain if they want the SDK to support building Swift code. In the future, we can download the Swift toolchain like we do for Linux in lieu of requiring the user to provide it.
@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov MaxDesiatov merged commit a0f6c54 into swiftlang:main Aug 29, 2025
39 checks passed
@CodingCarpincho CodingCarpincho deleted the freebsd-support branch August 29, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants